define(function(require, exports) {
	exports.init = function(e) {
		var vm = new Vue({
			el : 'body',
			data : {
				myform : {},
				model : {
					contactRequired : false ,
					//   email: 'dfdf'
				}
			},
			methods : {
				onSubmit : function() {
					//console.log(this.myform.$valid);
					myApp.alert(this.myform.$valid);
				},
				formHook : function(form) {
					this.form = form;
				}
			},
			ready : function() {
				setTimeout(function() {
					vm.model = {
						a : 'foo'
					};
					vm.$nextTick(function() {
						vm.form.setPristine();
					});
					//console.log(vm.form);
				}, 200);
			}
		});

		window.setPristine = function() {
			vm.form.setPristine();
		}

		window.setUntouched = function() {
			vm.form.setUntouched();
		}
	};

}); 